package com.cljh.service.impl;

import com.cljh.bean.UserAddress;
import com.cljh.mapper.UserAddressMapper;
import com.cljh.service.UserAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserAddressServiceImpl implements UserAddressService {
    @Autowired
    UserAddressMapper userAddressMapper;
    @Override
    public UserAddress selectById(Integer id) {
        return userAddressMapper.selectById(id);
    }

    @Override
    public List<UserAddress> selectByUserId(Integer id) {
        return userAddressMapper.selectByUserId(id);
    }


    @Override
    public boolean putAdd(UserAddress add) {
        return userAddressMapper.putAdd(add)>0;
    }

    @Override
    public boolean insertAdd(UserAddress add) {
        return userAddressMapper.insertAdd(add)>0;
    }

    @Override
    public boolean delete(Integer id) {
        return userAddressMapper.deleteById(id)>0;
    }
}
